package com.dong.bean;

import org.springframework.context.Lifecycle;

/**
 * description
 *
 * @author Administrator 2021/08/30 14:21
 */
public class MyLifeCycle implements Lifecycle {

    private volatile boolean running = false;

    @Override
    public void start() {
        System.out.println("LifeCycle--start");
        running = true;
    }

    @Override
    public void stop() {
        System.out.println("LifeCycle--stop");
        running = false;
    }

    @Override
    public boolean isRunning() {
        return running;
    }
}
